Adjust to Better Stack convention#1
Merged
Merged
Conversation
- README: point badge and clone URL at the logtail org, link the Better Stack HTTP source docs and dashboard instead of Logtail - package.json: add a description - Rename the forwarder logtailLogForwarder -> betterStackLogForwarder (src/forwarders/logtail.ts -> betterStack.ts) and its test file
Update the ingestion endpoint from in.logtail.com to in.logs.betterstack.com and introduce Better Stack-named env vars while keeping the legacy ones as fallbacks (non-breaking for existing deployments): - env.ts: prefer SOURCE_TOKEN / INGESTING_HOST, fall back to LOGTAIL_TOKEN / LOGTAIL_HTTP_API_URL; default host in.logs.betterstack.com; resolve to sourceToken / ingestionUrl - extension.ts: consume the resolved sourceToken / ingestionUrl - README: document the new variables, defaults, and legacy fallbacks - tests: cover precedence, legacy fallback, default host, and missing token
Per-source ingesting hosts live under betterstackdata.com (e.g. s123456.lu-trq-1.betterstackdata.com), not betterstack.com. Fix the env.ts comment, tell the README to set INGESTING_HOST from the source settings, and use a made-up cluster host in the env tests. No logic change — INGESTING_HOST stays an opaque host, so nothing to validate.
e7c664c to
8d5b134
Compare
PetrHeinz
approved these changes
Jul 9, 2026
PetrHeinz
left a comment
Member
There was a problem hiding this comment.
Thanks 🙌 - just two 💄 around the rebranding, and one pending comment to compatibility with newer runtimes.
| | ---------------------------------------- | ------------------------------------------------------- | ------------------------------------ | | ||
| | LOGTAIL_TOKEN | Logtail source bearer token | **required** | | ||
| | LOGTAIL_HTTP_API_URL | Logtail HTTP source ingestion API URL | `https://in.logtail.com/` | | ||
| | SOURCE_TOKEN | Better Stack source bearer token | **required** | |
Member
There was a problem hiding this comment.
We don't call it source bearer token, just source token:
Suggested change
| | SOURCE_TOKEN | Better Stack source bearer token | **required** | | |
| | SOURCE_TOKEN | Better Stack source token | **required** | |
Collaborator
Author
There was a problem hiding this comment.
right - technically that's jargon/artifact of it being a HTTP connection. thanks!
| Once deployed set the `LOGTAIL_TOKEN` environment variable on your Lambda to your HTTP API source from Logtail, and [add the layer](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html) to your Lambda function. | ||
| On next invocation your Lambda logs should start appearing in your Logtail console. | ||
| Once deployed set the `SOURCE_TOKEN` environment variable on your Lambda to your Better Stack source token, and [add the layer](https://docs.aws.amazon.com/lambda/latest/dg/invocation-layers.html) to your Lambda function. | ||
| On next invocation your Lambda logs should start appearing in [Better Stack](https://telemetry.betterstack.com/). |
Member
There was a problem hiding this comment.
I'd be more specific:
Suggested change
| On next invocation your Lambda logs should start appearing in [Better Stack](https://telemetry.betterstack.com/). | |
| On next invocation your Lambda logs should start appearing in **Telemetry** -> [Live tail](https://telemetry.betterstack.com/team/0/tail). |
| @@ -19,15 +19,15 @@ $ aws lambda publish-layer-version \ | |||
Member
There was a problem hiding this comment.
nodejs20.x is already deprecated, we should aim at 22 / 24
https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
Collaborator
Author
There was a problem hiding this comment.
:O time flies, thank you!
- "source bearer token" -> "source token" (Better Stack's term) - point the success step at Telemetry -> Live tail
nodejs20.x reached end-of-life on 2026-04-30; move to the current runtimes. - README: advertise nodejs22.x and nodejs24.x as compatible runtimes - build: esbuild target node22 - CI: build and test on node 22
- pull_request: validate PRs (including from forks) against the merge result - push: main only, so post-merge/badge CI runs without double-firing on same-repo feature-branch PRs - keep workflow_dispatch for manual runs Takes effect once this workflow is on main; GitHub evaluates pull_request triggers from the base branch's copy of the workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the fork in line with Better Stack instead of the old Logtail branding, and updates where logs are sent.
logtailLogForwarder→betterStackLogForwarder) so the code reads consistently.in.logs.betterstack.com(wasin.logtail.com).SOURCE_TOKEN/INGESTING_HOST, matching the names we use across Better Stack. The oldLOGTAIL_TOKEN/LOGTAIL_HTTP_API_URLstill work as fallbacks, so existing layers don't break.Docs on betterstack.com are being updated separately.